/*
 * TextFieldComponentTag.java
 *
 * Created on May 21, 2007, 3:03 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package info.javatech.jmf.components.textField.server;

import info.javatech.jmf.common.components.TextFieldConstants;
import javax.faces.component.UIComponent;
import javax.faces.event.MethodExpressionActionListener;
import javax.faces.webapp.UIComponentELTag;
import javax.el.MethodExpression;
import javax.el.ValueExpression;

/**
 *
 * @author root
 */
public class TextFieldComponentTag extends UIComponentELTag{
    
    private ValueExpression label;
    private ValueExpression string;
    private ValueExpression maximumSize;
    private ValueExpression type;
    private ValueExpression isPassword;
    private ValueExpression isUneditable;
    private ValueExpression isSensitive;
    private ValueExpression isNonPredictive;
    private ValueExpression isInitialCapsWord;
    private ValueExpression isInitialCapsSentense;
    private ValueExpression initialInputMode;
    private ValueExpression prefferedHSize;
    private ValueExpression prefferedVSize;
    private ValueExpression defaultCommand;
    
    /**
     * Creates a new instance of TextFieldComponentTag
     */
    public TextFieldComponentTag() {
    }
    
    public String getComponentType() {
        return TextFieldConstants.TYPE_NAME;
    }
    
    public String getRendererType() {
        return null;
    }
    
    public void setType(ValueExpression type) {
        this.type = type;
    }
    
    public ValueExpression getLabel() {
        return label;
    }
    
    public void setLabel(ValueExpression label) {
        this.label = label;
    }
    
    public ValueExpression getString() {
        return string;
    }
    
    public void setString(ValueExpression string) {
        this.string = string;
    }
    
    public ValueExpression getMaximumSize() {
        return maximumSize;
    }
    
    public void setMaximumSize(ValueExpression maximumSize) {
        this.maximumSize = maximumSize;
    }
    
    public ValueExpression getType() {
        return type;
    }
    
    public ValueExpression getIsPassword() {
        return isPassword;
    }
    
    public void setIsPassword(ValueExpression isPassword) {
        this.isPassword = isPassword;
    }
    
    public ValueExpression getIsUneditable() {
        return isUneditable;
    }
    
    public void setIsUneditable(ValueExpression isUneditable) {
        this.isUneditable = isUneditable;
    }
    
    public ValueExpression getIsSensetive() {
        return isSensitive;
    }
    
    public void setIsSensetive(ValueExpression isSensetive) {
        this.isSensitive = isSensetive;
    }
    
    public ValueExpression getIsNonPredictive() {
        return isNonPredictive;
    }
    
    public void setIsNonPredictive(ValueExpression isNonPredictive) {
        this.isNonPredictive = isNonPredictive;
    }
    
    public ValueExpression getIsNonInitialCapsWord() {
        return isInitialCapsWord;
    }
    
    public void setIsNonInitialCapsWord(ValueExpression isNonInitialCapsWord) {
        this.isInitialCapsWord = isNonInitialCapsWord;
    }
    
    public ValueExpression getIsNonInitialCapsSentense() {
        return isInitialCapsSentense;
    }
    
    public void setIsNonInitialCapsSentense(ValueExpression isNonInitialCapsSentense) {
        this.isInitialCapsSentense = isNonInitialCapsSentense;
    }
    
    public ValueExpression getInitialInputMode() {
        return initialInputMode;
    }
    
    public void setInitialInputMode(ValueExpression initialInputMode) {
        this.initialInputMode = initialInputMode;
    }
    
    public ValueExpression getPrefferedHSize() {
        return prefferedHSize;
    }
    
    public void setPrefferedHSize(ValueExpression prefferedHSize) {
        this.prefferedHSize = prefferedHSize;
    }
    
    public ValueExpression getPrefferedVSize() {
        return prefferedVSize;
    }
    
    public void setPrefferedVSize(ValueExpression prefferedVSize) {
        this.prefferedVSize = prefferedVSize;
    }
    
    public ValueExpression getDefaultCommand() {
        return defaultCommand;
    }
    
    public void setDefaultCommand(ValueExpression defaultCommand) {
        this.defaultCommand = defaultCommand;
    }
    
    
    protected void setProperties(UIComponent component) {
        super.setProperties(component);
        
        TextFieldComponent textField = (TextFieldComponent) component;
        
        textField.setValueExpression("label",label);
        textField.setValueExpression("value",string);
        textField.setValueExpression("maximumSize",maximumSize);
        textField.setValueExpression("type",type);
        textField.setValueExpression("isPassword",isPassword);
        textField.setValueExpression("isUneditable",isUneditable);
        textField.setValueExpression("isSensitive",isSensitive);
        textField.setValueExpression("isNonPredictive",isNonPredictive);
        textField.setValueExpression("isInitialCapsWord",isInitialCapsWord);
        textField.setValueExpression("isInitialCapsSentense",isInitialCapsSentense);
        textField.setValueExpression("initialInputMode",initialInputMode);
        textField.setValueExpression("prefferedHSize",prefferedHSize);
        textField.setValueExpression("prefferedVSize",prefferedVSize);
        textField.setValueExpression("defaultCommand",defaultCommand);
    }
    
    public void release() {
        super.release();
        setLabel(null);
        setString(null);
        setMaximumSize(null);
        setType(null);
        setIsPassword(null);
        setIsUneditable(null);
        setIsSensetive(null);
        setIsNonPredictive(null);
        setIsNonInitialCapsWord(null);
        setIsNonInitialCapsSentense(null);
        setInitialInputMode(null);
        setPrefferedHSize(null);
        setPrefferedVSize(null);
        setDefaultCommand(null);
    }
    
}
